/* 基础布局样式 */
body {
    background-color: #f2f2f2;
    padding: 10px;
}

.page-container {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.main-content {
    display: flex;
    flex: 1;
    gap: 20px;
    margin-top: 20px;
    min-height: 0;
    /* 重要：防止flex子元素溢出 */
}

/* 左侧边栏样式 */
.left-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    border: 1px solid #e6e6e6;
    background-color: #fff;
    overflow: hidden;
}

.sidebar-header {
    background-color: #f8f8f8;
    padding: 12px 15px;
    border-bottom: 1px solid #e6e6e6;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* 搜索框样式 */
.search-box {
    padding: 10px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e6e6e6;
}

.search-box .layui-input {
    height: 36px;
}

/* 员工列表样式 */
.employee-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 0;
    /* 重要：防止flex子元素溢出 */
}

.employee-item {
    margin-bottom: 10px;
    cursor: grab;
}

.employee-card {
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    padding: 10px;
    background-color: #fff;
    transition: all 0.3s;
}

.employee-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.employee-name {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.employee-info {
    font-size: 12px;
    color: #666;
}

.employee-info div {
    margin-bottom: 3px;
}

/* 右侧内容区样式 */
.right-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    border: 1px solid #e6e6e6;
    background-color: #fff;
    overflow: hidden;
    min-width: 0;
    /* 重要：防止flex子元素溢出 */
}

/* 顶部控制区样式 */
.top-controls {
    background-color: #f8f8f8;
    padding: 15px;
    border-bottom: 1px solid #e6e6e6;
}

.top-controls .layui-form-item {
    margin-bottom: 0;
}

.top-controls .layui-inline {
    margin-right: 10px;
    margin-bottom: 0;
}

/* 班次时间信息样式 */
.shift-times-info {
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e6e6e6;
}

.shift-times-header {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.shift-times-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shift-time-item {
    padding: 8px 12px;
    border-radius: 4px;
    background-color: #fff;
    border-left: 3px solid #1890ff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-width: 120px;
}

/* 排班表容器样式 */
.schedule-table-container {
    flex: 1;
    overflow: auto;
    padding: 15px;
    min-height: 0;
    /* 重要：防止flex子元素溢出 */
}

/* 排班表格样式 */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e6e6e6;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #e6e6e6;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.schedule-table th {
    background-color: #f8f8f8;
    font-weight: 500;
}

.time-column {
    width: 100px;
    background-color: #f8f8f8;
}

/* 工位信息样式 */
.work-station-info {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.worker-info {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #fff;
}

.worker-count {
    font-size: 12px;
    color: #fff;
    margin-bottom: 4px;
}

/* 拖拽相关样式 */
.dragging {
    opacity: 0.5;
}

.dragover {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px dashed #fff;
}

/* 滚动条样式 */
.employee-list::-webkit-scrollbar,
.schedule-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.employee-list::-webkit-scrollbar-track,
.schedule-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.employee-list::-webkit-scrollbar-thumb,
.schedule-table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.employee-list::-webkit-scrollbar-thumb:hover,
.schedule-table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 工位容器样式 */
.workstation-container {
    max-height: 200px;
    overflow-y: auto;
    margin: 5px 0;
    padding-right: 5px;
}

/* 无数据提示样式 */
.no-data {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* 已排班员工提示样式 */
.already-scheduled {
    display: none;
    position: absolute;
    right: 8px;
    top: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

/* 员工悬浮提示样式 */
.employee-hover-tooltip {
    position: fixed;
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 300px;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-title {
    font-weight: bold;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e6e6e6;
    color: #333;
}

.tooltip-employee-item {
    padding: 4px 0;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tooltip-employee-item:hover {
    background-color: #f5f5f5;
}